Move GtkListBox g_autoptr macros to the class header
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2015 13:48:31 +0000 (13:48 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2015 13:48:31 +0000 (13:48 +0000)
This allows GtkPlacesViewRow to use G_DECLARE_FINAL_TYPE without having
to include gtk.h.

gtk/gtk-autocleanups.h
gtk/gtklistbox.h

index 4a9e621746f3cbf3aa60068c203305f801bdadcb..60cccdd943a7c22fa90d8b04724e3198e8a314b5 100644 (file)
@@ -116,8 +116,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLabel, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLayout, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLevelBar, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLinkButton, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListBox, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListBoxRow, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListStore, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLockButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenu, g_object_unref)
index 71200875c5b0418d27775dfa7d827ef3363c6115..61c00d88ec12eefa8198fb21bc36ffb60eb8d10a 100644 (file)
@@ -313,6 +313,11 @@ void           gtk_list_box_bind_model                   (GtkListBox
                                                           gpointer                      user_data,
                                                           GDestroyNotify                user_data_free_func);
 
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListBox, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListBoxRow, g_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif